package com.hellogood.yaohuo.client.bussiness.peisong;

import com.hellogood.yaohuo.client.bussiness.SearchController;
import com.hellogood.yaohuo.client.common.SearchResultAsynCallback;
import com.hellogood.yaohuo.shared.services.PeisongService;
import com.smartgwt.client.widgets.grid.ListGridField;

public class PeisongSearchController extends SearchController {

	@Override
	public void searchForm(String orgCode, String startDate, String endDate, String rz) {
		PeisongService.Util.getInstance().searchPeisongFormByOrgCodeAndDate(orgCode, 0, startDate, endDate, rz, new SearchResultAsynCallback(listGrid));

	}

	@Override
	protected void buildFormFields() {
		orgItem.setTitle("门店");
		form.setFields(orgItem, startDateItem, endDateItem, accountSelectItem, searchItem);
	}

	@Override
	protected void buildListFields() {
		orgField.setTitle("配送中心");
		fields = new ListGridField[] { codeField, shopField, orgField, dateField, amountField, costField, psCostField, zdUserField, zdDateField, rzDateField, remarkField };
	}
}
